#ifndef _BITMAP_H
#define _BITMAP_H
//
//  Bitmap.h
//
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
#pragma pack(push,1)

class BitMap	
{
public:
	 //BITMAPFILEHEADER
	 typedef struct BITMAPFILEHEADERR
	 {
		 WORD bfType;
		 DWORD bfSize;
		 DWORD bfReserved;
		 DWORD bfOffBits;
	 }B_FILEHEADER;

	 //BITMAPINFOHEADER
	 typedef struct BITMAPINFOHEADERR
	 {
		 DWORD biSize;
		 LONG biWidth;
		 LONG biHeight;
		 WORD biPlanes;
		 WORD biBitCount;
		 DWORD biCompression;
		 DWORD biSizeImage;
		 LONG biXPelsPerMeter;
		 LONG biYPelsPerMeter;
		 DWORD biClrUsed;
		 DWORD biClrImportant;
	 }B_INFOHEADER;

	 ////RGB
	 typedef struct  BITMAPRGB
	 {
		 unsigned char bBlue;
		 unsigned char gGreen;
		 unsigned char rRed;
	 }B_RGB;

	 typedef struct MBITMAP
	 {
		B_FILEHEADER fileHeader;
		B_INFOHEADER infoHeader;
		B_RGB* IMAGEDATA;
	 }B_BITMAP;

	 typedef UINT32 BGRA;

	 void BitMap::LoadBitmapFile (HWND hwnd, char* filename,HDC hdc);
	 void dispBmp(char *filename, HDC hdc);
};
#endif